#ifndef __LGUIBUTTON_H__
#define __LGUIBUTTON_H__

#include "LGUIWindow.h"
#include "LAMEBitmap.h"

class LGUIButton : public LGUIWindow  
{
	bool pressed;
	bool lastPressed;
	int style;
	LAMEBitmap *bmp;
protected:
	bool down;
	const TCHAR *text;
public:
	LGUIButton(const TCHAR *text, int id, int _x, int _y, int _w, int _h, int _style=0, LAMEBitmap *_bmp=0);
	virtual ~LGUIButton();

	void draw(int xoff, int yoff);
	void penDown(int px, int py);
	void penMove(int px, int py, bool pressed);
	void penUp(int px, int py);
	void setText(const TCHAR *txt) {text=txt;} //TODO FULHACK
	int value() { return down;}
	void setValue(int _v)
	{
		down = _v ? true : false;
		redraw();
	}
};


#endif //__LGUIBUTTON_H__